keymap: Remove leftover code
authorMatthias Clasen <mclasen@redhat.com>
Wed, 6 May 2020 17:15:45 +0000 (13:15 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 6 May 2020 18:27:45 +0000 (14:27 -0400)
When I removed the 0-termination for the entries for
each keyval, I remove the code initializing the key,
but accidentally left the code that adds it to the
array, so gdk_keymap_get_cached_entries_for_keyval
returns one extra, uninitialized value at the end
of the array. Stop doing that.

gdk/gdkkeys.c

index 4d8978e552e2867822711676ccdd1953bbb2bbef..0c63aefa2552dbdc8022bce8ebdde7f4df4c56ab 100644 (file)
@@ -576,14 +576,10 @@ gdk_keymap_get_cached_entries_for_keyval (GdkKeymap     *keymap,
   cached = GPOINTER_TO_UINT (g_hash_table_lookup (keymap->cache, GUINT_TO_POINTER (keyval)));
   if (cached == 0)
     {
-      GdkKeymapKey key;
-
       offset = keymap->cached_keys->len;
 
       GDK_KEYMAP_GET_CLASS (keymap)->get_entries_for_keyval (keymap, keyval, keymap->cached_keys);
 
-      g_array_append_val (keymap->cached_keys, key);
-
       len = keymap->cached_keys->len - offset;
       g_assert (len <= 255);